// formPackage/pages/newHousePublishModule/newHousePublishFirst/newHousePublishFirst.js

let app = getApp();
Page({

  /**
   * 页面的初始数据
   */
  data: {
    themeStyle: "",
    showSinglePop: false,//显示选择弹窗
    singlePopType: "",//单项弹窗类型
    singlePopTitle: "选择",//单项弹窗标题
    showDeliveryTimePop: false,//交付时间选择
    minDate: new Date(2000, 12, 31).getTime(),
    maxDate: new Date(2050, 12, 31).getTime(),
    timePopType: "",
    showCityArea: false,//城市区域
    formData: {
      name: "",//楼盘名称
      cityCode: "",
      cityName: "",
      areaName: "",
      areaCode: "",
      address: "",
      provinceCode: "",
      provinceName: "",
      category: 1,//1:商铺，2：写字楼
      deposit: "",//押金支付方式，为空则电话咨询
      area: "",//面积
      transferMoney: "",//转让费

      decoration: "",//装修
      // detailDoorAddress: "",
      houseDong: "",
      houseUnit: "",
      houseFloor: "",
      houseRoomNo: "",
      homeownerName: "",
      homeownerPhone: "",
      latitude: "",//纬度
      longitude: "",//经度
      coverPic: "",//封面图
      saleType: 1,//1:租，2:卖， 3:可租可卖
      salePrice: "",//卖价
      rentPrice: "",//租价
      storeyHeight: "",//层高
      tags: [

      ],
      secondTags: [

      ],
      images: [],//商铺图片
      station: "",//工位数量
      isSplit: false,//是否可分割
      minRent: "",//最短租期
      isCanRegisterCompany: false,//是否可以注册公司
      usedType: "餐饮/美容美发/生活服务/零售/宾馆住宿/批发/其他"
    },
    usedTypeArr: [
      {
        name: "餐饮",
        isChoose: false
      },
      {
        name: "美容美发",
        isChoose: false
      },
      {
        name: "生活服务",
        isChoose: false
      },
      {
        name: "零售",
        isChoose: false
      },
      {
        name: "宾馆住宿",
        isChoose: false
      },
      {
        name: "批发",
        isChoose: false
      },
      {
        name: "其他",
        isChoose: false
      }
    ],
    secondTagArr: [],//房源特色标签
    selectSecondTagArr: [],//已选中的房源特色标签
    houseMainTag: {},//房源主标签
    houseNumber: "",
    isHaveBasicInfo: false,//是否已有新房基础信息
    btnTitle: "保存",
    mainTagsArr: [

    ],
    shopCategoryTypeArr: [
      {
        name: "商铺",
        category: 1,
      },
      {
        name: "写字楼",
        category: 2,
      }
    ],
    saleTypeArr: [
      {
        name: "出租",
        category: 1,
      },
      {
        name: "售卖",
        category: 2,
      },
      {
        name: "可租可卖",
        category: 3,
      }
    ],
    selectSaleTypeIndex: 0,//默认选择出租
    selectShopCategoryIndex: 0,//默认选中商铺
    currentMainTagsArr: [],//当前选中的主标签
    mainSelectTagIndex: 100,//主标签
    tagsType: 1,//默认请求主标签
    /**
     * type: 0 :普通标签
     *       1 :主标签
     */

    isFoldTag: false,
    shopNumber: "",
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {



  },


  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {
    if (app.globalData.themeStyle) {
      this.setData({
        themeStyle: app.globalData.themeStyle
      })
    }
  },



})